﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;

namespace Prism.Core.Net.Tcp
{
    public class SpeedLimitableConnection : ProgressableConnection
    {

        /// <summary>
        /// 初始化可限速高级连接的新实例。
        /// </summary>
        /// <param name="target">目标。</param>
        public SpeedLimitableConnection(ConnectionTarget target)
            : base(target)
        {
        }

        /// <summary>
        /// 初始化可限速高级连接的新实例。
        /// </summary>
        /// <param name="tcpClient">Tcp客户端。</param>
        internal SpeedLimitableConnection(TcpClient tcpClient)
            : base(tcpClient)
        {

        }

        public SpeedLimitableConnection(Connection BaseConnection)
            : this(BaseConnection.TcpClient)
        {


        }

        public DataTransportSpeedLimiter ReadDataSpeedLimiter { get; set; }

        public DataTransportSpeedLimiter WriteDataSpeedLimiter { get; set; }


        public override void Dispose()
        {
            base.Dispose();
            GC.SuppressFinalize(this);
        }
    }
}
